import teachersRoutes from "../../router/teachersRoutes";

interface APIProps {
  errCode: number;
  errMsg: string;
  data?: any;
}

// 教师登录
export const teacherLoginApi = (username: string, password: string) =>
  new Promise<APIProps>((resolve) => {
    console.log("接收到请求：", username, password);

    resolve({
      errCode: 200,
      errMsg: "ok",
      data: {
        userId: 1,
        username,
        avatar: "http://www.img.com",
        department: "教育事业部",
        token: "kjaxbbxa",
        roleList: teachersRoutes,
      },
    });
  });
